<cfset BASE = CreateObject("component", "#session.rootDir#.cfc.base") />
<cfset mainQueries = CreateObject("component", "#session.rootDir#.cfc.queries") />

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlTerminationHeader(
    "", <!---JS links--->
    "", <!---CSS links--->
    "Step 4:  Facilities - Termination", <!---Page Title--->
    "Status" <!---Active Nav Link--->
)#
<!---HTML header, css links, js links, and page title--->

<cfset BASE = CreateObject("component", "#session.rootDir#.cfc.base") />
<cfset mainQueries = CreateObject("component", "#session.rootDir#.cfc.queries") />
<cfset statusQueries = CreateObject("component", "#session.rootDir#.cfc.statusQueries") />


<cfif Session.Auth EQ True and (Session.AuthType EQ Session.IT or Session.AuthType EQ Session.HR)>

	<cfset QUERIES.GetStep4Waiting = statusQueries.funcGetTerminationSCFStepWaiting(25) />
    
	<!---p class="date">#dateformat(now(), "mmmm")# <b>#dateformat(now(), "d")#</b></p--->
	<h1 class="title">Step 4:  Facilities - Termination </h1>
	<div class="entry">
		Welcome, #Session.arrEmpInfo.FirstName# #Session.arrEmpInfo.LastName#.  
		In this step, we'll confirm that the terminated individuals 
		have indeed been terminated in the facilities system.  
		This is the list of employees that are staged for 
		termination in Facilities.  After successfully terminating 
		the employee, please place a check in the box next to their 
		name and hit the "Complete" button.  This will update their 
		EPAR record and remove them from the Facilities queue.
		<BR /> <BR />
		
		<cfif QUERIES.GetStep4Waiting.recordcount GT 0>
			<table width="100%">
				<tr>
					<td align="center">
						<cfform name="frmStep4" method="post" action="api.cfm?api=step4_access_control_termination">
						<table>
							<tr>
								<td width=1%>&nbsp;</td>
								<td width=5>&nbsp;</td>
								<td align="left">
								    <strong>Employee Name</strong>
								</td>
								<td width=5>&nbsp;</td>
								<td align="left">
								    <strong>Termination Date</strong>
								</td>
							</tr>
							<cfloop query="QUERIES.GetStep4Waiting">
                            
								<!--- <cfset objTerm = SCF_Employee_GetEmployee(#QUERIES.GetStep4Waiting.RosettaID#)>	 --->
	                            <cfset objTerm = mainQueries.funcGettPersonsObj( mainQueries.funcGetRosettaObj( QUERIES.GetStep4Waiting.RosettaID ).HRProd_PersonIDNo ) />
	                            <cfset QUERIES.GetTermDetails = mainQueries.funcGetTermDetails( QUERIES.GetStep4Waiting.TermReqID, 25 ) />
	                           
								<tr>
									<td align="center">
									    <cfinput type="checkbox" name="Term#QUERIES.GetTermDetails.ActionStepID#">
									</td>
									<td>&nbsp;</td>
									<td align="left">#objTerm.FirstName# #objTerm.LastName#</td>
									<td>&nbsp;</td>
									<td align="left">#DateFormat(QUERIES.GetTermDetails.TermDate, "M/DD/YYYY")#</td>
								</tr>
                                
							</cfloop>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td align="left">
								    <cfinput type="hidden" name="FormSubmit" value="">
								    <cfinput type="Submit" name="Complete" value="Complete">
								</td>
							</tr>
						</table>
						</cfform>  
				    </td>
				</tr>
			</table>
		<cfelse>
            <span class="error">At the present time, there are not any employees staged for termination.</span>
		</cfif>
		
	</div>

<cfelse>
    <cfinclude template="denied.cfm">
</cfif>

<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlTerminationFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>

